<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title></title>
    <script src="js/vue.js" type="text/javascript"></script>
  </head>
  <body>
    <div id="app">
      json: {{ people }}<br />
      {{ people.age}}<br />
      {{ people.sex }}<br />
      {{ sayName()}}<br />
      {{ whatColor('pink') }}

      {{ address }}

      <input type="text" name="addr" v-model="address"/>
    </div>
  </body>

  <script>
  var v = new Vue({
    el: "#app",
    data: {
      people : {
        name : "tony",
        age : 18,
        sex : "man"
      },
      address: "北京大钟寺"
    },
    methods: {
      sayName : function(){
        return this.people.name;
      },
      whatColor : function( color ){
        alert(color);
      }
    }
  });
  </script>
</html>
